package physgin;

import javax.vecmath.*;

/**
 * Interface describing the structure of all physics objects.
 * Contains the physics formula used as the models for 
 * movement and collision resolution.
 */
interface Physics
    {
        /**
         * A Point3f object containing the effects
         * of gravity.
         */
        static Point3f grav = new Point3f(0.0f,-9.8f,0.0f);
        
        /**
         * Returns the physical position of this object.
         *
         * @return  Point3f The objects position.
         * @see             javax.vecmath.Point3f
         */
        Point3f getPos();
        
        /**
         * Returns the physical objects mass.
         *
         * @return  float   The objects mass.
         */
        float getMass();
       
        /**
         * Returns the velocity of this object.
         *
         * @return  Point3f The objects velocity.
         * @see             javax.vecmath.Point3f
         */
        Point3f getVel();
        
        /**
         * Returns the physical objects size.
         *
         * @return  float   The objects size.
         */
        float getSize();
        
        /**
         * Returns the physical objects orientation.
         *
         * @return  float   The objects orientation.
         */
        float getOrient();
        
        /**
         * Returns the forces exerted by this object.
         *
         * @return  Point3f The objects forces.
         * @see             javax.vecmath.Point3f
         */
        Point3f getForce();
        
        /**
         * Returns a clone of this object.
         *
         * @return  Physics A clone of this object.
         */
        Physics getPhysics();
        
        /**
         * Performs an updating of this objects position in space.
         *
         * @return  void
         */
        void updatePos();
        
        /**
         * Resolves a collision with this object and the one specified.
         *
         * @param   pB  A physics object which has collided with this one.
         */
        void resolve(Physics pB);    
        
        /**
         * Returns the shape of the object
         *
         * @return   the shape of the object
         */
        Shapes getShape();
        
    }




